<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="org.apache.struts.action.*,java.util.*,java.io.*"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	/**
	 * @author 谭湘元
	 * @since 2009/04/23
	 */

 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb18030" />
<title>操作异常</title>
<fmt:setBundle basename="PathResource" scope="session" />
<link href="<%=request.getContextPath() %>/<fmt:message key='StylePath' />style.css" rel="stylesheet" type="text/css" />
</head>

<body  class="bcolor">
<form action="teachBook.do?method=previewBook" method="post" enctype="multipart/form-data" name="teachBookForm" id="form1">
	<input name="bookId" type="hidden" value="<c:out value="${teachBook.bookId }"/>"/>

  <table cellspacing="0" cellpadding="0" width="99%" align="center" border="0">
	<tbody>
	<tr>
        <td width="7"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_01.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_05.gif"><table cellspacing="0" cellpadding="0" width="100%" border="0">
            <tbody>
              <tr>
                <td width="30"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_02.gif" width="30" /></td>
                <td align="left" width="200" background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_03.gif">&nbsp;<strong> 操 作 异 常</strong></td>
                <td width="59"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_04.gif" width="59" /></td>
                <td>&nbsp;</td>
              </tr>
            </tbody>
        </table></td>
        <td width="8"><img height="38" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_06.gif" width="8" /></td>
    </tr>
    <tr>
		<td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_07.gif"><img height="1" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
        <td bgcolor="#f7fbff">
      		<%
      			Exception e = (Exception)request.getAttribute(org.apache.struts.Globals.EXCEPTION_KEY);
      			
      			String applicationStatus = application.getInitParameter("applicationStatus");
      			//ActionMessages messages = (ActionMessages)request.getAttribute(org.apache.struts.Globals.ERROR_KEY);
      			//Iterator it = messages.get();
      			//while(it.hasNext()){
      			//    ActionMessage temp = (ActionMessage)it.next();
      			    //out.println(temp.getValues());
      			//}
      		%>
          <table cellspacing="0" bordercolordark="#ccccff" cellpadding="0" width="100%" bordercolorlight="#ffffff" border="0">
		  	<tbody>
	          <tr>
	            <td><table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#a4c9ec" class="fontbot">
	                <tr>
	                  <td width="15%" height="20" align="right" valign="middle" bgcolor="#e6f0f8">错误提示：</td>
	                  <td height="20" align="left" valign="middle" bgcolor="#FFFFFF" style="color:red;">
							<%
								out.println(e.getMessage());
							%>
					  </td>
	                </tr>
					<%
						if(applicationStatus!=null && applicationStatus.equals("development")){
					%>
					<tr>
						<td width="15%" height="20" align="right" valign="middle" bgcolor="#e6f0f8">堆栈信息：</td>
		                <td height="20" align="left" valign="middle" bgcolor="#FFFFFF" style="color:red;">
								<%
									ByteArrayOutputStream temp = new ByteArrayOutputStream();
					      			PrintStream printStream = new PrintStream(temp);
					      			e.printStackTrace(printStream);
					      			out.println(temp.toString());
								%>
						</td>
					</tr>
					<%
						}
					%>
	            </table></td>
	          </tr>
			</tbody>
        </table>
		<table cellspacing="1" cellpadding="0" width="100%" bgcolor="#ffffff" border="0">
           <tbody>
                <tr>
                  <td valign="middle" bgcolor="#e6f0f8"><table cellspacing="0" cellpadding="3" width="100%" border="0">
                      <tbody>
			            <tr>
              <td height="20" align="center"><a href="javascript:parent.window.history.go(-1);" onfocus="this.blur()"><img src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />back.gif" width="53" height="22" border="0" /></a></td>
            </tr>
       				 </tbody>
                  </table></td>
                </tr>
           </tbody>
        </table>
		</td>
		<td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_09.gif"><img height="1" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />spacer.gif" width="1" /></td>
    </tr>
    <tr>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_10.gif" width="7" /></td>
        <td background="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_11.gif">&nbsp;</td>
        <td><img height="22" alt="" src="<%=request.getContextPath() %>/<fmt:message key='CommonImagePath' />table_1_12.gif" width="8" /></td>
      </tr>
	</tbody>
  </table>
</form>
</body>
</html>
 